var __extends =
    (this && this.__extends) ||
    (function () {
      var e = function (r, t) {
        return (e =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (e, r) {
              e.__proto__ = r;
            }) ||
          function (e, r) {
            for (var t in r)
              Object.prototype.hasOwnProperty.call(r, t) && (e[t] = r[t]);
          })(r, t);
      };
      return function (r, t) {
        function o() {
          this.constructor = r;
        }
        if ("function" != typeof t && null !== t)
          throw new TypeError(
            "Class extends value " + String(t) + " is not a constructor or null"
          );
        e(r, t),
          (r.prototype =
            null === t
              ? Object.create(t)
              : ((o.prototype = t.prototype), new o()));
      };
    })(),
  RecoverMedicalView = (function (e) {
    function r() {
      var r = e.call(this) || this;
      return (
        (r.loadRecoverMedicalData = {
          caller: r,
          code: 1416,
          method: function (e) {
            if (0 == e.code) {
              r.RecoverArr = e.list;
              for (var t, o = [], n = e.list, c = 0; c < n.length; c++)
                0 == r.isNoShowId(n[c].id) &&
                  ((t = {
                    rec_title: { text: n[c].name },
                    rec_number: { text: n[c].num },
                    btn_recover: { label: "" },
                  }),
                  o.push(t));
              r.list_recoverMedical.array = o;
            }
          },
        }),
        r.btn_recoverCancle.on(Laya.Event.CLICK, r, r.onCancle),
        (r.list_recoverMedical.selectEnable = !0),
        (r.list_recoverMedical.vScrollBarSkin = ""),
        r.list_recoverMedical.on(Laya.Event.CLICK, r, r.onRecoveryDidClickFn),
        (r.list_recoverMedical.renderHandler = new Laya.Handler(
          r,
          r.updateRecoveryItem
        )),
        WebSocketService.addListener(r.loadRecoverMedicalData),
        r
      );
    }
    return (
      __extends(r, e),
      (r.showRecoverView = function () {
        return (
          null == this.recoverV && (this.recoverV = new r()),
          WebSocketService.send({ c: 1416, d: { pageNum: 0 } }),
          this.recoverV
        );
      }),
      (r.prototype.isNoShowId = function (e) {
        return 33 == e || 35 == e || 36 == e || 37 == e;
      }),
      (r.prototype.updateRecoveryItem = function (e, r) {
        if (!(r > this.RecoverArr.length)) {
          var t = e.getChildByName("btn_recover");
          (t.skin = "comp/commonpic/btn_dialog_sure.png"), (t.label = "回收");
        }
      }),
      (r.prototype.onRecoveryDidClickFn = function (e) {
        if ("" != e.target.name && "btn_recover" == e.target.name) {
          var r = this.list_recoverMedical.selectedIndex,
            t = this.RecoverArr[r].id,
            o = this.RecoverArr[r].num,
            n = this.RecoverArr[r].name;
          RecoverDetailView.showRecDetailView(t, o, n);
        }
      }),
      (r.prototype.onCancle = function () {
        this.removeSelf();
      }),
      r
    );
  })(ui.HospitalController.RecoverMedicalViewUI);
